*********************************************************************************************

ADSP-BF533 EZ-KIT Lite C based Two MEMS Microphone Interface 

Analog Devices, Inc.
DSP Division
Three Technology Way
P.O. Box 9106
Norwood, MA 02062

Date Created:	23/07/2010

____________________________________________________________________________________________

This directory contains the Blackfin 533 software routines, which are used to implement a complete
real time implementation of two MEMS mic interface to Blackfin 533.

program Files contained in this directory:


main.c				C file containing the main program and variable declaration
Initialize.c		        C file containing all initialisation routines
ISR.c				C file containing the interrupt service routine for 
					SPORT1_RX
filtering.c			C file for processing incoming data
Talkthrough.h			C header file containing prototypes and macros
real_time_mems.dpj		VisualDSP++ project file

____________________________________________________________________________________________


CONTENTS

I.	FUNCTIONAL DESCRIPTION
II.	IMPLEMENTATION DESCRIPTION
III.	OPERATION DESCRIPTION


I.    FUNCTIONAL DESCRIPTION

The data from both the microphones are taken from SPORT1 and inside the ISR of each descriptor the received 
PDM data is sent for filtering separately :: 5th order CIC followed by FIR decimation filters and sent out through 
the DAC of AD1836 codec on board connected to SPORT0.(Refer the EE note for more details)	

II.   IMPLEMENTATION DESCRIPTION

The Initialization module initializes:

1. EBIU setup 
2. Flash setup
3. SPI setup to initialize AD1836 codec
4. SPORT0 and SPORT1 setup
5. DMA setup in 3 descriptor input and 3 descriptor output method.
6. Interrupt configuration


III.  OPERATION DESCRIPTION

- Open the project "real_time_mems.dpj" in an ADSP-BF533 EZ-KIT Lite session in the 
  VisualDSP Integrated Development Environment (IDDE).
- Under the "Project" tab, select "Build Project" (program is then loaded 
	automatically into DSP).
- Turn pin 5 and 6 of SW9 on the ADSP-BF533EZ-KIT Lite ON, these will connect 
	RSCLK0 -> TSCLK0 and RFS0 -> TFS0.  

- Turn on all the SW12 pins which connect the SPORT0 signals to the CODEC

- Connections needs to made as follows:

                	  ADMP421 MICs                  			  Blackfin  



                      1  -> L/R select    				 one Mic's to GND pin 3/4/87/88  of J2                  
                                                                         and the other Mic's to Vdd pin 1/2/89/90  of J2	

                      3  -> GND of both Mics  				 GND pin 3/4/87/88  of J2


                      4  ->Data of both Mics    			 Pin 29 of J2 connector of BF 533 EZ kit


                      5  ->Vdd of both Mics    		 		 Vdd pin 1/2/89/90  of J2									
//	-------------------------------------------------------------------------------------------------------					
                      2  -> Clk of both Mics   				 Extrenal source at 3.072 Mhz and connect the same to pin 31 of J2(SPORT FS) 
                                                               
                      Extrenal source at 6.144 Mhz                       Pin 33 of J2(SPORT clk) connector of BF 533 EZ kit


- Setup an input source such as earphone/speaker to the microphones' audio inlets and connect the audio cable from 
  audio output jack to a speaker/headphone. See the DSP-BF533 EZ-KIT Lite User's Manual for more information on setting 
  up the hardware.

- Select "Run" from the "Debug" tab on the menu bar of VisualDSP and start the audio input source.

- Listen to the reconstructed sound in the speaker/headphone.
